{% extends "baseLarge.html" %}

{% block contentLarge %}
  <div id="myPar">
    <table id="wineTable" border=1>
      <tr>
        <th></th>
        <th>0</th>
        <th>1</th>
        <th>2</th>
        <th>3</th>
        <th>4</th>
        <th>5</th>
        <th>6</th>
      </tr>
      {% for row in wines.rows %}
        <tr>
          <th id="wineRowId">{{row.id}}</th>
          {% for wine in row.wines %}
            {% if user.canEdit %}
              {% if wine.name  %}
                <td id="cellWithWine"><a href="/editWine?row={{wine.row}}&column={{wine.column}}">O</a></td>
              {% else %}
                <td id="cellWithoutWine"><a href="/editWine?row={{wine.row}}&column={{wine.column}}">O</a></td>
              {% endif %}
            {% else %}
              {% if wine.name  %}
                <td id="cellWithWine"><a href="/showWine?row={{wine.row}}&column={{wine.column}}">O</a></td>
              {% else %}
                <td id="cellWithoutWine">O</td>
              {% endif %}
            {% endif %}
          {% endfor %}
        </tr>
      {% endfor %}
    </table>
    <p>
    {% for wine in wineList %}
      [{{wine.row}}, {{wine.column}}] {{wine.name}}, {{wine.year}}, {{wine.type}} <br>
    {% endfor %}
  </div>
{% endblock %}
